package com.supreme.threadserver.controller;

import com.supreme.commonboot.utils.AjaxResp;
import com.supreme.threadserver.service.AtomicService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(value = "atomic")
public class AtomicController {

    @Resource
    private AtomicService atomicService;

    @GetMapping(value = "longAtomic")
    public AjaxResp longAtomic() {
        atomicService.testAtomicTaskThread();
        return AjaxResp.instance();
    }
}
